import request from '@/utils/request'

// 查询措施库列表
export function listMeasure(query) {
  return request({
    url: '/fmea/pfmea/measure/list',
    method: 'get',
    params: query
  })
}

// 查询措施库详细
export function getMeasure(id) {
  return request({
    url: '/fmea/pfmea/measure/' + id,
    method: 'get'
  })
}

// 新增措施库
export function addMeasure(data) {
  return request({
    url: '/fmea/pfmea/measure',
    method: 'post',
    data: data
  })
}

// 修改措施库
export function updateMeasure(data) {
  return request({
    url: '/fmea/pfmea/measure',
    method: 'put',
    data: data
  })
}

// 删除措施库
export function delMeasure(id) {
  return request({
    url: '/fmea/pfmea/measure/' + id,
    method: 'delete'
  })
}

// 导出措施库
export function exportMeasure(query) {
  return request({
    url: '/fmea/pfmea/measure/export',
    method: 'get',
    params: query
  })
}

// 修改版本状态
export function modifyVStatus(query) {
  return request({
    url: '/fmea/pfmea/measure/updateVersionStatus',
    method: 'get',
    params: query
  })
}
// 校验措施库
export function exactMeasureKnow(query) {
  return request({
    url: '/fmea/pfmea/measure/exactQuery',
    method: 'get',
    params: query
  })
}

// 下载模板
export function downLoadTemplate(query) {
  return request({
    url: '/fmea/pfmea/measure/downloadImportMeasureTemplate',
    method: 'get',
    params: query
  })
}
